POV-Ray : Newsgroups : povray.general : Random thoughts about povray and xml : Re: Random thoughts about povray and xml Server Time
3 Aug 2024 08:12:32 EDT (-0400)
  Re: Random thoughts about povray and xml  
From: Breton Slivka
Date: 19 Mar 2004 23:35:21
Message: <Xns94B1DBBA41E8ZenZenPsychocom@203.29.75.35>
Actually, I was thinking along the lines that either the XML version of
the language would either unroll the traditional SDL, so when deriving
XML from from a #while, statement for instance, it would merely run the
while loop to create the XML, so and so times. 

Either that, or the conditionals in povray seem like they may be simple
enough to just make them container elements. This wouldn't invalidate it
as XML. it would merely be a way of containing the information relevent
to the scene description. 

like for instance

<if value="true">
<box a="1", b="-1"><pigment><color r="1"/></pigment></box>
</if>

As far as I know, this is valid xml, and it would simply be a matter of
interpretation to convert this into the proper scene. 

However, I am not suggesting XML as a replacement of SDL, as you say,
the loops and conditionals and programmatic elements are not so easy to
implement in XML. however, XML could possibly be a solution to a very
specific problem POVRAY has..... interoperability with other 3d
programs. 

For instance, we no longer have polyray to fall back on for previewing
our scenes before doing a full raytraced render.  The closest thing is
the patched povray with limited openGL support. 

If it were possible to unroll povray's "compile time" programmatic
elements into an XML file with some level of automation, conversion to
other formats for preview would be that much easier. 

Patrick Elliott <sha### [at] hotmailcom> wrote in
news:MPG.1ac56ef08bcbb1779899ed@news.povray.org: 

> In article <Xns94B1A5863FF0DZenZenPsychocom@203.29.75.35>, 
> Zen### [at] ZenPsychocom says...
>> Anyways, I'd be interested in hearing why this is a stupid idea.
>> 
> 
> Not sure if it is stupid exactly. However, XML is not a language so
> much as a container. You can organize things with it, but nearly all 
> implementations use a <SCRIPT> block of some sort to provide the
> 'real' code that makes all of the stuff work. That block contains all
> the stuff that actually provides functions, program control, etc. In
> other words, it is still a container, it just happens to contain the
> code that ties all the pieces together. If you make it so it does
> more, then it really isn't XML anymore.
> 
> The other issue is the discussion being done about object oriented 
> design. XML can provide a 'known' structure, but it contains no 
> implementation for changing that structure dynamically during use. So,
> you could do:
> 
> <union>
>   <box ...>
>   <box ...>
>   <sphere ...>
> </union>
> 
> but not programmatically use if/then or other mechanisms that provide 
> flow control to selectively remove one of those objects. The XML only 
> provides the structure and data, not a means to manipulate it. Again,
> if you change it to allow this, then it isn't XML anymore. The result
> would either end up being nothing more that a drastic redesign of the
> existing SDL that adds a lot of extra junk, but with the same
> function, or if you stuck to more strict XML standards, you would make
> it too inflexible to do even half of what the existing system allows.
> 
> XML is useful for what is was designed to do, but for some reason 
> everyone thinks it is the answer to every problem now. It isn't, nor
> was it ever intended to.
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.